export default {
	data() {
		return {}
	},
	onShow(){
		// if(uni.getStorageSync('noInvite')){
		// 	this.$tools.showTx(this.$t('common.ndhymydj'))
		// 	uni.setStorageSync('noInvite', false)
		// }
	},
	onShareAppMessage(option) {
		console.log(option);
		let rand = Math.floor(Math.random() * (getApp().globalData.shareArr).length);
		return {
			title: (getApp().globalData.shareArr)[rand].share_title, //分享的名称
			path: option.target?'/pages/index/index?share_type='+option.target.dataset.type+'&share_code='+option.target.dataset.code : '/pages/index/index',
			// path: '/pages/index/index?share_type=5&share_code='+getApp().globalData.share_code+'&share_sort=2',
			//页面的路径
			imageUrl: 'https://siha.vxmeng.com'+(getApp().globalData.shareArr)[rand].share_image,
		}
	},
	//分享到朋友圈
	onShareTimeline() {
		let rand = Math.floor(Math.random() * (getApp().globalData.shareArr).length);
		console.log(rand)
		return {
			title: (getApp().globalData.shareArr)[rand].share_title,
			path: '/pages/index/index',
			// path: '/pages/index/index?share_type=5&share_code='+getApp().globalData.share_code+'&share_sort=2',
			imageUrl: 'https://siha.vxmeng.com'+(getApp().globalData.shareArr)[rand].share_image
		}			
	},
}
